package cn.edu.seu.ssny.dao;

import cn.edu.seu.ssny.dao.support.IBaseDao;
import cn.edu.seu.ssny.entity.DeviceCategory;
import cn.edu.seu.ssny.entity.Project;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;


@Repository
public interface IDeviceCategoryDao extends IBaseDao<DeviceCategory, Integer> {
    List<DeviceCategory> findByProjectOrderByName(Project project);

    Optional<DeviceCategory> findByProjectAndName(Project project, String name);
}
